package cl.blueprintsit.teaching.inheritance;

/**
 * This class is responsible for modeling the notion of point in a 2D
 * environment.
 * 
 * This implementation is a Cartesian point.
 * @author Andres Farias
 */
public class Point2D implements IPoint {
	
	/** The absice coordenate */
	double x;
	
	/** The ordenate coordenate */
	double y;

	/**
	 * This constructor creates a full point with a given set of values for x and y.
	 * @param x The absice.
	 * @param y The ordenate.
	 */
	public Point2D(double x, double y) {
		this.x = x;
		this.y = y;
	}
	
	/**
	 * This constructor creates a full point located at the origin.
	 * This is like doing <code>new Point2D(0, 0)</code>
	 */
	public Point2D() {
		this.x = 0;
		this.y = 0;
	}

	@Override
	public boolean isOrigin() {
		return (x==0) && (y==0);
	}

	@Override
	public void move(IPoint point) {
		this.x = point.getCartesianX();
		this.y = point.getCartesianY();
		
	}

	@Override
	public int getDistanceFromAnotherPoint(IPoint point) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public double getCartesianX() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public double getCartesianY() {
		// TODO Auto-generated method stub
		return 0;
	}
}
